package com.erp.warehouse.clouderp_warehouse.service.impl.inventory;

import com.erp.warehouse.clouderp_warehouse.mapper.inventory.InventoryBatchMapper;
import com.erp.warehouse.clouderp_warehouse.pojo.inbound.InboundOrderItem;
import com.erp.warehouse.clouderp_warehouse.pojo.inventory.InventoryBatch;
import com.erp.warehouse.clouderp_warehouse.service.inventory.InventoryBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 2025/11/6 8:58
 * author: 向远洋
 */
@Service
@Transactional
public class InventoryBatchServiceImpl implements InventoryBatchService {
    @Autowired
    InventoryBatchMapper batchMapper;

    //返回1：新增成功 2：修改成功
    @Override
    public int addBatchStock(InboundOrderItem inboundOrderItem, String companyId) {
        return batchMapper.insert(inboundOrderItem, companyId);
    }

    @Override
    public List<InventoryBatch> getBatchList(Map<String, Object> params) {
        return batchMapper.selectBatchList(params);
    }
}
